<?php 
  // AQ_ID_COPYRIGHT_PHP_WHYWAIT
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>Mobile wait time </title>
        <meta name="viewport" content="width=device-width, initial-scale=1"> 

            <?php
            Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl . '/js/jquery1.7.1.js');
            ?>

            <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />

            <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/waittime_mobile_login.css" media="screen, projection" /> 
            
    </head>
    <!-- class="ui-body-c ui-dialog.ui-overlay-c"-->
    <body class="content_background" >
        <center>

            <div data-role="page"  id="foo"><div class="admin_image">
                    <img id="headerimg" src="<?php echo Yii::app()->baseUrl ?>/images/logo.jpg"/> </div>

                <div data-role="content">


                    <?php
                    if (yii::app()->user->hasFlash('WaittimeallowedMsg')) {
                        echo Message::Show(yii::app()->user->getFlash('WaittimeallowedMsg'), MsgType::Err, false, $animationType = 'fadeOut');
                    }
                    if (!isset($model))
                        $model = new WaitTimeModel();

                    $this->pageTitle = Yii::app()->name . ' - ' . Yii::t("UserModule.user", "Login");
                    ?>

                    <?php if (Yii::app()->user->hasFlash('loginMessage')): ?>

                        <div class="success">
                            <?php echo Yii::app()->user->getFlash('loginMessage'); ?>
                        </div>

                        <?php
                    endif;

                    if (!(Yii::app()->user->isAdmin() ||
                            Yii::app()->user->hasRole(WebUser::RESTURANTLROLID) ||
                            Yii::app()->user->hasRole(WebUser::APPUSERROLID) ||
                            Yii::app()->user->hasRole(WebUser::RESTURANTADMINROLID))
                    ) {
                        ?>
                        <div data-role="header"><h1 style="color: #9C1008"><b>Login</b></h1></div>

                        <div class="form" class="content">
                            <?php echo CHtml::beginForm(array('action' => 'testing')); ?>

                            <?php echo CHtml::errorSummary($model); ?>

                            <div class="rowtitle">
                                <?php echo CHtml::activeLabelEx($model, 'User Name: '); ?>
                            </div>
                            <div class="rowfield">
                                <?php echo CHtml::activeTextField($model, 'username', array('class' => 'ui-input-text ', 'value' => '', "onfocus" => "javascript:if(this.value==''){this.value=''}", "onblur" => "javascript:if(this.value==''){this.value=''}")) ?>
                            </div>

                            <div class="rowtitle">
                                <?php echo CHtml::activeLabelEx($model, 'password:'); ?>
                            </div>
                            <div class="rowfield">
                                <?php echo CHtml::activePasswordField($model, 'password', array('value' => '', 'class' => "inputtext ui-input-text", "onfocus" => "javascript:if(this.value==''){this.value=''}", "onblur" => "javascript:if(this.value==''){this.value=''}")) ?>
                            </div>

                            <div class="row">
                                <div class="rowreset">
                                    <input name="reset" type="reset" value="Clear" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only ui-input-text" /> 
                                </div>
                                <div class="rowsubmit">
                                    <?php echo CHtml::submitButton(Yii::t("UserModule.user", "Login"), array("class" => "ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only btn ui-input-text")); ?>
                                </div>
                            </div>


                            <?php echo CHtml::endForm(); ?>
                        </div><!-- form -->
                        <?php
                    }
                    ?>


                </div>

            </div></center>
    </body>
</html>

